3.10.15 \(\int (a+i a \tan (e+f x))^4 (c-i c \tan (e+f x))^4 \, dx\) [915]

Optimal. Leaf size=77 \[ \frac {a^4 c^4 \tan (e+f x)}{f}+\frac {a^4 c^4 \tan ^3(e+f x)}{f}+\frac {3 a^4 c^4 \tan ^5(e+f x)}{5 f}+\frac {a^4 c^4 \tan ^7(e+f x)}{7 f} \]

[Out]

a^4*c^4*tan(f*x+e)/f+a^4*c^4*tan(f*x+e)^3/f+3/5*a^4*c^4*tan(f*x+e)^5/f+1/7*a^4*c^4*tan(f*x+e)^7/f

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {3603, 3852} \begin {gather*} \frac {a^4 c^4 \tan ^7(e+f x)}{7 f}+\frac {3 a^4 c^4 \tan ^5(e+f x)}{5 f}+\frac {a^4 c^4 \tan ^3(e+f x)}{f}+\frac {a^4 c^4 \tan (e+f x)}{f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[e + f*x])^4*(c - I*c*Tan[e + f*x])^4,x]

[Out]

(a^4*c^4*Tan[e + f*x])/f + (a^4*c^4*Tan[e + f*x]^3)/f + (3*a^4*c^4*Tan[e + f*x]^5)/(5*f) + (a^4*c^4*Tan[e + f*
x]^7)/(7*f)

Rule 3603

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Di
st[a^m*c^m, Int[Sec[e + f*x]^(2*m)*(c + d*Tan[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] &&
EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0] && IntegerQ[m] &&  !(IGtQ[n, 0] && (LtQ[m, 0] || GtQ[m, n]))

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin {align*} \int (a+i a \tan (e+f x))^4 (c-i c \tan (e+f x))^4 \, dx &=\left (a^4 c^4\right ) \int \sec ^8(e+f x) \, dx\\ &=-\frac {\left (a^4 c^4\right ) \text {Subst}\left (\int \left (1+3 x^2+3 x^4+x^6\right ) \, dx,x,-\tan (e+f x)\right )}{f}\\ &=\frac {a^4 c^4 \tan (e+f x)}{f}+\frac {a^4 c^4 \tan ^3(e+f x)}{f}+\frac {3 a^4 c^4 \tan ^5(e+f x)}{5 f}+\frac {a^4 c^4 \tan ^7(e+f x)}{7 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.25, size = 49, normalized size = 0.64 \begin {gather*} \frac {a^4 c^4 \left (\tan (e+f x)+\tan ^3(e+f x)+\frac {3}{5} \tan ^5(e+f x)+\frac {1}{7} \tan ^7(e+f x)\right )}{f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[e + f*x])^4*(c - I*c*Tan[e + f*x])^4,x]

[Out]

(a^4*c^4*(Tan[e + f*x] + Tan[e + f*x]^3 + (3*Tan[e + f*x]^5)/5 + Tan[e + f*x]^7/7))/f

________________________________________________________________________________________

Maple [A]
time = 0.06, size = 46, normalized size = 0.60

method result size
derivativedivides \(\frac {a^{4} c^{4} \left (\frac {\left (\tan ^{7}\left (f x +e \right )\right )}{7}+\frac {3 \left (\tan ^{5}\left (f x +e \right )\right )}{5}+\tan ^{3}\left (f x +e \right )+\tan \left (f x +e \right )\right )}{f}\) \(46\)
default \(\frac {a^{4} c^{4} \left (\frac {\left (\tan ^{7}\left (f x +e \right )\right )}{7}+\frac {3 \left (\tan ^{5}\left (f x +e \right )\right )}{5}+\tan ^{3}\left (f x +e \right )+\tan \left (f x +e \right )\right )}{f}\) \(46\)
risch \(\frac {32 i a^{4} c^{4} \left (35 \,{\mathrm e}^{6 i \left (f x +e \right )}+21 \,{\mathrm e}^{4 i \left (f x +e \right )}+7 \,{\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{35 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{7}}\) \(61\)
norman \(\frac {a^{4} c^{4} \tan \left (f x +e \right )}{f}+\frac {a^{4} c^{4} \left (\tan ^{3}\left (f x +e \right )\right )}{f}+\frac {3 a^{4} c^{4} \left (\tan ^{5}\left (f x +e \right )\right )}{5 f}+\frac {a^{4} c^{4} \left (\tan ^{7}\left (f x +e \right )\right )}{7 f}\) \(74\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(f*x+e))^4*(c-I*c*tan(f*x+e))^4,x,method=_RETURNVERBOSE)

[Out]

1/f*a^4*c^4*(1/7*tan(f*x+e)^7+3/5*tan(f*x+e)^5+tan(f*x+e)^3+tan(f*x+e))

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 72, normalized size = 0.94 \begin {gather*} \frac {5 \, a^{4} c^{4} \tan \left (f x + e\right )^{7} + 21 \, a^{4} c^{4} \tan \left (f x + e\right )^{5} + 35 \, a^{4} c^{4} \tan \left (f x + e\right )^{3} + 35 \, a^{4} c^{4} \tan \left (f x + e\right )}{35 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^4*(c-I*c*tan(f*x+e))^4,x, algorithm="maxima")

[Out]

1/35*(5*a^4*c^4*tan(f*x + e)^7 + 21*a^4*c^4*tan(f*x + e)^5 + 35*a^4*c^4*tan(f*x + e)^3 + 35*a^4*c^4*tan(f*x +
e))/f

________________________________________________________________________________________

Fricas [C] Result contains complex when optimal does not.
time = 0.83, size = 159, normalized size = 2.06 \begin {gather*} -\frac {32 \, {\left (-35 i \, a^{4} c^{4} e^{\left (6 i \, f x + 6 i \, e\right )} - 21 i \, a^{4} c^{4} e^{\left (4 i \, f x + 4 i \, e\right )} - 7 i \, a^{4} c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} - i \, a^{4} c^{4}\right )}}{35 \, {\left (f e^{\left (14 i \, f x + 14 i \, e\right )} + 7 \, f e^{\left (12 i \, f x + 12 i \, e\right )} + 21 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 35 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 35 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 21 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 7 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^4*(c-I*c*tan(f*x+e))^4,x, algorithm="fricas")

[Out]

-32/35*(-35*I*a^4*c^4*e^(6*I*f*x + 6*I*e) - 21*I*a^4*c^4*e^(4*I*f*x + 4*I*e) - 7*I*a^4*c^4*e^(2*I*f*x + 2*I*e)
 - I*a^4*c^4)/(f*e^(14*I*f*x + 14*I*e) + 7*f*e^(12*I*f*x + 12*I*e) + 21*f*e^(10*I*f*x + 10*I*e) + 35*f*e^(8*I*
f*x + 8*I*e) + 35*f*e^(6*I*f*x + 6*I*e) + 21*f*e^(4*I*f*x + 4*I*e) + 7*f*e^(2*I*f*x + 2*I*e) + f)

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 0.46, size = 219, normalized size = 2.84 \begin {gather*} \frac {1120 i a^{4} c^{4} e^{6 i e} e^{6 i f x} + 672 i a^{4} c^{4} e^{4 i e} e^{4 i f x} + 224 i a^{4} c^{4} e^{2 i e} e^{2 i f x} + 32 i a^{4} c^{4}}{35 f e^{14 i e} e^{14 i f x} + 245 f e^{12 i e} e^{12 i f x} + 735 f e^{10 i e} e^{10 i f x} + 1225 f e^{8 i e} e^{8 i f x} + 1225 f e^{6 i e} e^{6 i f x} + 735 f e^{4 i e} e^{4 i f x} + 245 f e^{2 i e} e^{2 i f x} + 35 f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))**4*(c-I*c*tan(f*x+e))**4,x)

[Out]

(1120*I*a**4*c**4*exp(6*I*e)*exp(6*I*f*x) + 672*I*a**4*c**4*exp(4*I*e)*exp(4*I*f*x) + 224*I*a**4*c**4*exp(2*I*
e)*exp(2*I*f*x) + 32*I*a**4*c**4)/(35*f*exp(14*I*e)*exp(14*I*f*x) + 245*f*exp(12*I*e)*exp(12*I*f*x) + 735*f*ex
p(10*I*e)*exp(10*I*f*x) + 1225*f*exp(8*I*e)*exp(8*I*f*x) + 1225*f*exp(6*I*e)*exp(6*I*f*x) + 735*f*exp(4*I*e)*e
xp(4*I*f*x) + 245*f*exp(2*I*e)*exp(2*I*f*x) + 35*f)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 650 vs. \(2 (77) = 154\).
time = 1.23, size = 650, normalized size = 8.44 \begin {gather*} -\frac {35 \, a^{4} c^{4} \tan \left (f x\right )^{7} \tan \left (e\right )^{6} + 35 \, a^{4} c^{4} \tan \left (f x\right )^{6} \tan \left (e\right )^{7} + 35 \, a^{4} c^{4} \tan \left (f x\right )^{7} \tan \left (e\right )^{4} - 105 \, a^{4} c^{4} \tan \left (f x\right )^{6} \tan \left (e\right )^{5} - 105 \, a^{4} c^{4} \tan \left (f x\right )^{5} \tan \left (e\right )^{6} + 35 \, a^{4} c^{4} \tan \left (f x\right )^{4} \tan \left (e\right )^{7} + 21 \, a^{4} c^{4} \tan \left (f x\right )^{7} \tan \left (e\right )^{2} - 35 \, a^{4} c^{4} \tan \left (f x\right )^{6} \tan \left (e\right )^{3} + 315 \, a^{4} c^{4} \tan \left (f x\right )^{5} \tan \left (e\right )^{4} + 315 \, a^{4} c^{4} \tan \left (f x\right )^{4} \tan \left (e\right )^{5} - 35 \, a^{4} c^{4} \tan \left (f x\right )^{3} \tan \left (e\right )^{6} + 21 \, a^{4} c^{4} \tan \left (f x\right )^{2} \tan \left (e\right )^{7} + 5 \, a^{4} c^{4} \tan \left (f x\right )^{7} - 7 \, a^{4} c^{4} \tan \left (f x\right )^{6} \tan \left (e\right ) + 105 \, a^{4} c^{4} \tan \left (f x\right )^{5} \tan \left (e\right )^{2} - 315 \, a^{4} c^{4} \tan \left (f x\right )^{4} \tan \left (e\right )^{3} - 315 \, a^{4} c^{4} \tan \left (f x\right )^{3} \tan \left (e\right )^{4} + 105 \, a^{4} c^{4} \tan \left (f x\right )^{2} \tan \left (e\right )^{5} - 7 \, a^{4} c^{4} \tan \left (f x\right ) \tan \left (e\right )^{6} + 5 \, a^{4} c^{4} \tan \left (e\right )^{7} + 21 \, a^{4} c^{4} \tan \left (f x\right )^{5} - 35 \, a^{4} c^{4} \tan \left (f x\right )^{4} \tan \left (e\right ) + 315 \, a^{4} c^{4} \tan \left (f x\right )^{3} \tan \left (e\right )^{2} + 315 \, a^{4} c^{4} \tan \left (f x\right )^{2} \tan \left (e\right )^{3} - 35 \, a^{4} c^{4} \tan \left (f x\right ) \tan \left (e\right )^{4} + 21 \, a^{4} c^{4} \tan \left (e\right )^{5} + 35 \, a^{4} c^{4} \tan \left (f x\right )^{3} - 105 \, a^{4} c^{4} \tan \left (f x\right )^{2} \tan \left (e\right ) - 105 \, a^{4} c^{4} \tan \left (f x\right ) \tan \left (e\right )^{2} + 35 \, a^{4} c^{4} \tan \left (e\right )^{3} + 35 \, a^{4} c^{4} \tan \left (f x\right ) + 35 \, a^{4} c^{4} \tan \left (e\right )}{35 \, {\left (f \tan \left (f x\right )^{7} \tan \left (e\right )^{7} - 7 \, f \tan \left (f x\right )^{6} \tan \left (e\right )^{6} + 21 \, f \tan \left (f x\right )^{5} \tan \left (e\right )^{5} - 35 \, f \tan \left (f x\right )^{4} \tan \left (e\right )^{4} + 35 \, f \tan \left (f x\right )^{3} \tan \left (e\right )^{3} - 21 \, f \tan \left (f x\right )^{2} \tan \left (e\right )^{2} + 7 \, f \tan \left (f x\right ) \tan \left (e\right ) - f\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^4*(c-I*c*tan(f*x+e))^4,x, algorithm="giac")

[Out]

-1/35*(35*a^4*c^4*tan(f*x)^7*tan(e)^6 + 35*a^4*c^4*tan(f*x)^6*tan(e)^7 + 35*a^4*c^4*tan(f*x)^7*tan(e)^4 - 105*
a^4*c^4*tan(f*x)^6*tan(e)^5 - 105*a^4*c^4*tan(f*x)^5*tan(e)^6 + 35*a^4*c^4*tan(f*x)^4*tan(e)^7 + 21*a^4*c^4*ta
n(f*x)^7*tan(e)^2 - 35*a^4*c^4*tan(f*x)^6*tan(e)^3 + 315*a^4*c^4*tan(f*x)^5*tan(e)^4 + 315*a^4*c^4*tan(f*x)^4*
tan(e)^5 - 35*a^4*c^4*tan(f*x)^3*tan(e)^6 + 21*a^4*c^4*tan(f*x)^2*tan(e)^7 + 5*a^4*c^4*tan(f*x)^7 - 7*a^4*c^4*
tan(f*x)^6*tan(e) + 105*a^4*c^4*tan(f*x)^5*tan(e)^2 - 315*a^4*c^4*tan(f*x)^4*tan(e)^3 - 315*a^4*c^4*tan(f*x)^3
*tan(e)^4 + 105*a^4*c^4*tan(f*x)^2*tan(e)^5 - 7*a^4*c^4*tan(f*x)*tan(e)^6 + 5*a^4*c^4*tan(e)^7 + 21*a^4*c^4*ta
n(f*x)^5 - 35*a^4*c^4*tan(f*x)^4*tan(e) + 315*a^4*c^4*tan(f*x)^3*tan(e)^2 + 315*a^4*c^4*tan(f*x)^2*tan(e)^3 -
35*a^4*c^4*tan(f*x)*tan(e)^4 + 21*a^4*c^4*tan(e)^5 + 35*a^4*c^4*tan(f*x)^3 - 105*a^4*c^4*tan(f*x)^2*tan(e) - 1
05*a^4*c^4*tan(f*x)*tan(e)^2 + 35*a^4*c^4*tan(e)^3 + 35*a^4*c^4*tan(f*x) + 35*a^4*c^4*tan(e))/(f*tan(f*x)^7*ta
n(e)^7 - 7*f*tan(f*x)^6*tan(e)^6 + 21*f*tan(f*x)^5*tan(e)^5 - 35*f*tan(f*x)^4*tan(e)^4 + 35*f*tan(f*x)^3*tan(e
)^3 - 21*f*tan(f*x)^2*tan(e)^2 + 7*f*tan(f*x)*tan(e) - f)

________________________________________________________________________________________

Mupad [B]
time = 4.58, size = 82, normalized size = 1.06 \begin {gather*} \frac {a^4\,c^4\,\sin \left (e+f\,x\right )\,\left (35\,{\cos \left (e+f\,x\right )}^6+35\,{\cos \left (e+f\,x\right )}^4\,{\sin \left (e+f\,x\right )}^2+21\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^4+5\,{\sin \left (e+f\,x\right )}^6\right )}{35\,f\,{\cos \left (e+f\,x\right )}^7} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*tan(e + f*x)*1i)^4*(c - c*tan(e + f*x)*1i)^4,x)

[Out]

(a^4*c^4*sin(e + f*x)*(35*cos(e + f*x)^6 + 5*sin(e + f*x)^6 + 21*cos(e + f*x)^2*sin(e + f*x)^4 + 35*cos(e + f*
x)^4*sin(e + f*x)^2))/(35*f*cos(e + f*x)^7)

________________________________________________________________________________________